package com.koocloud.electroplatemanage.mapper;
import com.koocloud.electroplatemanage.pojo.CodeNameResult;
import com.koocloud.electroplatemanage.pojo.Quotation;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @program: electroplatemanage
 * @description: 工种Mapper接口
 * @author: zww
 * @create: 2020-09-29 15:55
 */
@Mapper
public interface QuotationMapper {
    //通过pk查询一条记录 delete_flag = "1"
    Quotation selectByPk(int pkQuotation);
    //通过pk查询一条记录  delete_flag = "0"
    Quotation selectByCode(String typeworkCode);
    //查询所有记录
    List<Quotation> selectAllData(Quotation quotation);
    //根据状态进行模糊查询 启用为1 禁用为0
    List<Quotation> selectByDeleteFlag(Quotation quotation);
    //插入一条记录
    int insert(Quotation quotation);
    //批量插入记录
    int batchInsert(List<Quotation> listQuotation);
    //逻辑删除一条记录
    int delete(@Param("quotationId")String quotationId, @Param("deleteFlag") String deleteFlag);
    //通过pks批量逻辑删除记录
    int batchDeleteByPks(List listPks);
    //修改一条记录
    int update(Quotation quotation);
    //修改一条记录 delete_flag
    int updateFlag(Quotation quotation);
    //获取
    List<CodeNameResult> selectTypeWork(String idOrName);
    //通过镀种名称查询一条记录
    Quotation selectByName(String name);

    List<Quotation> selectAllByName(String name);
    //获取工种总数
    int selectAmount();

    //通过镀种编号查询镀种信息
    Quotation selectByTypeWorkCode(String typeWorkCode);
}
